package wavedigest.data;

import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class RegisteredWave
{
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	private String waveID;
	
	@Persistent(mappedBy = "registeredWave")
	private List<EmailRegistration> registrations;

	@Persistent(mappedBy = "registeredWave")
	private List<WaveChange> changes;

	public RegisteredWave(String waveID)
	{
		this.waveID = waveID;
	}
	
	public Key getKey()
	{
		return key;
	}

	public void setKey(Key key)
	{
		this.key = key;
	}

	public void setWaveID(String waveID)
	{
		this.waveID = waveID;
	}

	public String getWaveID()
	{
		return waveID;
	}

	public void setRegistrations(List<EmailRegistration> registrations)
	{
		this.registrations = registrations;
	}

	public List<EmailRegistration> getRegistrations()
	{
		return registrations;
	}

	public void setChanges(List<WaveChange> changes)
	{
		this.changes = changes;
	}

	public List<WaveChange> getChanges()
	{
		return changes;
	}
}
